package com.nctu.dm.fpgrowth;

import java.util.Comparator;
import java.util.Vector;
class Mycompare implements Comparator
{
    public int compare(Object o1,Object o2)
    {
        String s1=(String)o1;
        String s2=(String)o2;
        try{
	        int i1 = Integer.parseInt(s1);
	        int	i2 = Integer.parseInt(s2);
	        return i1-i2;
        }catch(NumberFormatException e){
        	int r = s1.compareTo(s2);
        	if (r >0)
        		return 1;
        	else if(r<0)
        		return -1;
        	else 
        		return 0;
        }
    }
}

class TransactionValuePair
{
	public int count;
	public Vector<String> trans;
	
	public TransactionValuePair(){
		count = 0;
		trans = new Vector<String>(); 
	}	
	
	public TransactionValuePair(int c){
		count = c;
		trans = new Vector<String>(); 
	}
	public TransactionValuePair(int c,Vector<String> v){
		count = c;
		trans = v;
	}
	
}

public class Common {
	public static final boolean Debug = true;
	public static final int TimeDebug = 0;
	public static int first = 1;
	public static final String CMLD_NAME = "test.txt";
	public static final String FREQUENT_FILE = "FREQUENT_FILE.txt";
	public static final int mSupport= 3;
}
